USE [eProjectSem3]
GO

CREATE PROCEDURE [DeleteInterview]
(
	@InterviewID int
)
AS
BEGIN
	
	SET NOCOUNT ON
	DECLARE @Err int

	DELETE
	FROM [dbo].[tb_Interview]
	WHERE
		([InterviewID] = @InterviewID)
	SET @Err = @@Error

	RETURN
	END 
	GO

CREATE PROCEDURE [UpdateInterview]
(
	@InterviewID	INT ,
	@InterviewerID	VARCHAR(10) = NULL,
	@VacancyID		VARCHAR(10) = NULL,
	@ApplicantID	VARCHAR(10) = NULL,
	@DateInterview	DATETIME = NULL,
	@TimeDetails	NVARCHAR(10) = NUll
	
)
AS BEGIN

	SET NOCOUNT ON
	DECLARE @Err int
	
	UPDATE [dbo].[tb_Interview]
	SET
		[InterviewerID] = @InterviewerID,
		[VacancyID] = @VacancyID,
		[ApplicantID] = @ApplicantID,
		[DateInterview] = @DateInterview,
		[TimeDetails] = @TimeDetails
	WHERE
		([InterviewID] = @InterviewID)

	SET @Err = @@Error

	RETURN @Err
END
GO

		
